//
//  ZBDrawingTool.m
//  ZBDrawingTool
//
//  Created by apple on 2018/7/6.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "ZBDrawingTool.h"

@interface  ZBDrawingTool()


@property (nonatomic, strong) ZBDrawingView *drawingView;
@end

@implementation ZBDrawingTool
/**
 创建画板操作工具
 
 @param drawingView 面板
 @return 操作工具
 */
+ (ZBDrawingTool *)drawingToolWithDrawingView:(ZBDrawingView *)drawingView
{
    ZBDrawingTool *tool = [[ZBDrawingTool alloc]init];
    tool.drawingView = drawingView;
    return tool;
}

/**
 * 清除面板操作
 */
- (void)cleanDrawingView
{
    [self.drawingView clean];
}

/**
 * 返回上一步面板操作
 */
- (void)undoDrawingView
{
    [self.drawingView back];
}

/**
 保存绘画图片到相册
 */
- (void)saveDrawingImageToAlumImage
{
    [self.drawingView save];
}


/**
 获取图片
 */
- (UIImage *)getDrawingImage
{
    return [self.drawingView getDrawingImage];
}
@end
